<!--navbar-->
<div class="navbar">
    <div class="navbar-inner">
        <div class="left">
            <a href="#" class="link back">
                <i class="icon icon-return"></i>
            </a>
        </div>
        <div class="center">云果</div>
    </div>
</div>
<div class="pages navbar-through">
	<div class="page no-toolbar subtoolbar-through" data-page="minePay">
		<div class="page-content">
			<div class="module-flow row">
				{if:$this->status_name == '等待付款'}
				<h2>等待买家付款</h2>
				{elseif:$this->status_name == '等待发货'}
				<h2>等待商家发货</h2>
				{elseif:$this->status_name == '已发货'}
				<h2>商家已发货</h2>
				{elseif:$this->status_name == '已完成'}
				<h2>已确认收货</h2>
				{else:}
				<h2>{$this->status_name}</h2>
				{/if}
				<i class="icon icon-wallet"></i>
			</div>
			<div class="list-block module-order">
				<ul>
					{foreach:items=Api::run('getOrderGoodsListByGoodsid',array('#order_id#',$this->order_info['order_id'])) item=$good}
                    {set:$good_info = JSON::decode($good['goods_array'])}					
					<li class="o-p-detail item-inner">
						<div class="media">
							<img src="{$good['img']}" alt="">
						</div>
						<div class="title">
							<h4>{$good_info['name']}</h4>
							<div class="row">
								<div class="num">数量{$good['goods_nums']} x 单价{echo:$good['real_price']}</div>
								<div class="univalent">小计 {echo:$good['goods_nums']*$good['real_price']}</div>
							</div>
						</div>
					</li>
					{/foreach}
					
					<li class="item-inner adress">
						<div class="row">
							<h4 class="col-40 name">收货人:{$this->order_info['accept_name']}</h4>
							<div class="col-60 tel">联系电话:{$this->order_info['mobile']}</div>
						</div>
						<p>收货地址:{$this->order_info['province_str']} {$this->order_info['city_str']} {$this->order_info['area_str']} {$this->order_info['address']}</p>
					</li>
					<li class="item-inner odt">
						<p>订单编号:{$this->order_info['order_no']}</p>
						<p>下单时间:{$this->order_info['create_time']}</p>
						<div class="row">
							<p>配送方式:包邮</p>
							<p>订单状态:{echo:Order_Class::orderStatusText($orderStatus)}</p>
						</div>
						<p class="amount">合计:<small>&yen;</small><em>{$this->order_info['order_amount']}</em></p>
					</li>
					{if:$this->status_name == '等待付款'}
					<li class="item-inner total">
						<p>需付款:<em><small>&yen;</small>{$this->order_info['order_amount']}</em></p>
					</li>
					{else:}
					<li class="item-inner total row">
						<div class="title">付款明细:{$this->order_info['note']}</div>
						<p>代金券:<small>&yen;</small>{$this->order_info['promotions']}&nbsp;&nbsp;&nbsp;&nbsp;需付款:<em><small>&yen;</small>{$this->order_info['order_amount']}</em></p>
					</li>
					{/if}
				</ul>
			</div>
		</div>
		<div class="subtoolbar">
            <a href="javascript:void(0)" class="button service">联系客服</a>
            {if:$this->status_name == '等待付款'}
            <a href="#" data-href="{url:/yunblock/doPay/order_id/$this->order_info['order_id']}" class="button buy color-orange pay">付款</a>
			<a data="{$this->order_info['id']}" class="button buy color-orange cancel_order">取消订单</a>
			{elseif:$this->status_name == '等待发货'}
			{elseif:$this->status_name == '已发货'}
			<a href="{url:/yunucenter/freight/delivery_id/$this->order_info['freight']['id']}" class="button">查看物流</a>
			<a data="{$this->order_info['id']}" class="button color-orange confirm_order">确认收货</a>
			{elseif:$this->status_name == '已完成'}
			<a href="{url:/yunucenter/freight/delivery_id/$this->order_info['freight']['id']}" class="button">查看物流</a>
			<a href="{url:/yunucenter/refunds_money/order_id/$this->order_info['id']/order_goods_id/$good['id']}" class="button custom color-orange">售后</a>
            {/if}
        </div>
	</div>
</div>